// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, postBodyRequest, exportPost, getNoAuthRequest, postNoAuthRequest, postEncryptRequest, importRequestData } from '@/libs/axios';

// 分页获取数据
export const getBysPersonInfoList = params => {
    return postRequest('/bysPersonInfo/getByPage', params);
};
// 添加
export const addBysPersonInfo = params => {
    return postRequest('/bysPersonInfo/insertOrUpdate', params);
};
// 编辑
export const editBysPersonInfo = params => {
    return postRequest('/bysPersonInfo/insertOrUpdate', params);
};

export const getBysPersonInfoByIdCard = params => {
    return postRequest('/bysPersonInfo/getByIdCard', params);
};

// 管理员编辑毕业生信息
export const editBysInfo = params => {
    return postRequest('/bysPersonInfo/updateBysInfo', params);
};
// 删除
export const deleteBysPersonInfo = params => {
    return postRequest('/bysPersonInfo/delByIds', params);
};

// 清空生源
export const deleteAllBysPersonInfo = params => {
    return postRequest('/bysPersonInfo/deleteSy', params);
};

// 启用
export const enableBysPersonInfo = (id, params) => {
    return postRequest(`/bysPersonInfo/enable/${id}`, params);
};

// 禁用
export const disableBysPersonInfo = (id, params) => {
    return postRequest(`/bysPersonInfo/disable/${id}`, params);
};

//导入数据
export const importBysData = params => {
    return postBodyRequest('/bysPersonInfo/importData', params);
};
// 导入学籍信息(easyExcel)
export const easyExcelImportData = params => {
    return postBodyRequest('/bysPersonInfo/importBatch', params);
};

//导出全部
export const exportAllPersonInfo = () => {
    return exportPost('/bysPersonInfo/exportBatch');
};

export const bysPeronInfoDoneExportByIds = (param) => {
    return exportPost('/bysPersonInfo/exportByIds', param);
};

//执行一次比对任务（学校）
export const schoolDoOnce = () => {
    return postRequest('/bysPersonInfo/doOnce');
};


// region TODO 根据学校获取专业
export const acquireMajorApi = param => postRequest('/enterprise/getProfession', param);

export const getPeronZyApi = () => postRequest('/bysPersonInfo/getZy');
